<?php get_header(); ?>

<div class="content-top"></div>
<div class="content-bottom">
  <div class="wrapper">
    <?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
    
    <?php foreach((get_categories('child_of=4&&orderby=name&&order=desc')) as $category) { ?>
      <div class="products full">
        <?php $post = get_posts('category=' . $category->cat_ID. '&&numberposts=1&&orderby=post_date&&order=DESC'); ?>
        <?php $post = $post[0]; ?>
        <h3><?php echo $category->name; ?></h3>
        
        <?php if ( has_post_thumbnail() ) { ?>
          <div class="picture rounded-equal">
            <?php the_post_thumbnail(); ?>
          </div>
        <?php } ?>
        <div class="description">
          <p><?php echo $post->post_content; ?></p>
          
          <?php $category_id = $category->cat_ID; ?>
          <?php if($category->cat_ID == 5){ ?>
            <a href="<?php echo get_category_link($category_id); ?>">See our raw seafood products</a>
          <?php }else{ ?>
            <a href="<?php echo get_category_link($category_id); ?>">See our added value seafood products</a>
          <?php } ?>
        </div>
      </div>
    <?php } ?>
  </div>
</div>

<?php get_footer(); ?>
